Fixed issue where rotating phone restarts activities