fix bug where app switches unexpectedly
fix lint error