Fixed bug when pressing the back button;