Fix for #1267