Fix for #966