fixes instance collision issues with batch addition functionality. Also limits the files added to that specified in limit parameter for file picker