bad pointer use fixed by evil genius mr. Skriver