closes #591