Fix port checks