fixed upload helper bugs