Replaced back-button hack with better back-button hack