Rol,

There was indeed a bug in that code.