fixed long time bug of switching screen dimensions