fix issue with cancel not reloading the page