fixed issue #51
 Found an elegant solution for the issue related to window.location.hash