Fixed some bugs related to object removal, clipping, and duplication