closes #366