Added onPause
bugs
Revert "bugs"

This reverts commit 6806c53b32ae69f777271dfad6a6882806b6ae91.
Revert "Revert "bugs""

This reverts commit a3c2dccaa972c99d785283a4ed42f65a91c50dcc.