Fix out of bounderies leak