fixing bug with first instruction being freed