Fix bug in user guide code