fixes #645