closes #645