fixed port bug