If you have entered chords first, the keysig might be reflecting that chord and reverting to the flat keysig instead of the sharp.