fix the issue for screen rotate