fixed up hfbsm script