Re-add onPause and onResume methods