fix for extra window.history.back()