fixed the bug with merge delete