Fixes port check