Fix looping array