converting port to intval to avoid unexpected results