Fix removing elements from Array

Don't remove elements from the Array you're traversing!