Fixed problem with screen rotation.