-fix crash when rotating device