Fix for #1242