Fix pin bug