Fix bad delete and DoRotate()