Bug fix for #1383