fixed more deletion bugs