closes #511