Fixed problem with recursive uploading