fixes issue with erroneous query params