Closes #872