fixed dynamic port bug