fixes #688

Resolved these undefined issues