fixed off-by-one bug
gizmo tweaks