fix sem & mutex destroy