Closes #1231