Reset was only calculated once

Fixed an omision causing cleanup of the array to only be calculated
once, and thus suddenly deleting everyting