cleaning up array before reloading