fix some bugs in exampleRun, most of the examples now run fine