closes #639