fix parsing query strings with empty values