Closes #307.