Fixed a bug that reloaded the page