Fix parsing URL hash when no "?" was specified