Added applicationWillEnterForeground