add public_id
fix bug