Bug Fixes in example code