small bug fixes in the example script