fixing history bug with custom url params