closes #339