fix the problem with screen rotation.