fix erode, closing has bug, others is ok