Fixed bug that caused page reloads when clicking links