fixed possible exception
cleanup
fixed #122: start/stop screen wakelock in onWindowFocusChanged (not in onResume/onPause)