Avoid location.hash bug in Firefox. Closes issue #5