Bug fixed

Reloading the page is no longer necessary, the script now works all the
time.