Closes #347