Fixing the query optional parameters.