fix performance issues causing Box2D glitches in example