fix port bug