bug fixes in examples