apply patch from melissa to fix crashes for some maf input