Closes #1171