Ooops bad query string makes infinite loop