Corrected a bug with query parameters