added back debug param and added attachevent to trackhashchange