Fixed bug in EraseScope