fixed a page reloading bug