fix crash when phone orientation changed