Fixed bad upload code.