fix bug when rotate the screen