fixes #664

fix for global pollution and typo