sleep wake up screen rotation

after closing my PB case and it goes to sleep, when i wake it up again the screen will be in a random rotation for the password entry. The screen won't change rotation until after I unlock it, I have to rotate the device to enter the PW.The screen should still follow device rotation for PW entry.