Remove addShapeByType(). Call shape.update() in addShapeDirect().