code sample bugfix, closes #85