Closes #1242