Closes #1291