Terminate activity before return to main screen