Fixed rotate issues and onDestroy isues