fixed a bug in pmc_read_pin()