DOC+BUG Fix bug in code example

Pointed out by email by Gianfranco Durin