Bug fixes in background upload