fix pin bug