Fixed bug in the modifier destruction code