closes #597