Fixed editing an array while iterating through it