fixed port int typecast issue