closes #512