fixed a bug where the MainActivity did not reload when pressing the back button