added onPause correctly to all activities