port check bug fix