right port number
fix cases where resource does not exist