making loader work with hashchange event