Closes #336.