cleanup bsarray