Fixed URL hash trouble when looping.