closes #539