Fix for #1222