Mutex is default recursive; Fix several bugs of progen