broken func call
Fixing array overflows :(