closes #677