bugfix because of undefined variable from official cookbook..