fixed BSML Analysis writing bug