Fix for #1265