closes #588