App will now return to main view when closing