make sure port values are integers

See issue #7