Closes #1161