fixes a bug whearch fails if the url params are empty