Bug fix for example code