fix port checks