Corrected logic when resizing a body in the editor