closes #670