Fixed bug in upload manager