Prevent default when hash fragment changes