Fix for undefined variables (#150)