fixed pin bug