Fixing broken browser back button