Fix in case endpoint is empty