Closes #313.