Fix s3 task bug