Made back button functional