fixed chunk upload when last part is not at end of file