Fixed issue with deletions.

Reported by Zack Gainsforth (@ZGainsforth)