Closes #989