example code bug fixed