writeGestureBindingTemplate and writeOnTapDefault templates fix