Fixed an out of range acces (I think)