Added onPause Method