Clearing arrays after inserting and before downloading new versions