fix undefined variable

fixes #8