Some fixes to mean ensemble