Closes #982