fixes #664