closes #513