fix annoying redirect loops on query strings