Closes #1317