Fixed nasty bug with invalid querystrings