solved bug when rotating screen