Fix s3_repo plugin code