Fix for #780