wrap box2d in anonymous function

seems to help