Change preference order to Hash over Search

location.hash is subject to change in browser window and should
override search params.