fix bug in work_commitment