I've done this before and found the best way is to ask the gate agent before boarding to change it (or if there is a general customer service counter nearby). Make sure to ask for a new boarding pass so that you can check the number has been entered correctly. My experience with lounges...