Correctly destroy mutex before termination
More comments