Fixed for loops, everything works now :)