Fixed initial screen rotation problem.

The screen wouldn't be rotated if it was landscape at the beginning. Now
it rotates to the correct rotation immediately.