Closes #1013