make sure port is always positive