fix getURLParam to actually parse and decode parameters correctly