Fixed bug where wasn't reset on page load