bug fixes to example