Closes #1266