fix activity lifecycle stuff