fixed more leaks and corrected OnHitScript storage