Closes #391