Fix crash on removing constrained objects