fixing bad free