fix remove() and merge()