handle querystrings correctly