Fix: claim method returns an error if the port is not valid