closes #507