fix the bug of unreleased mutex, found by Dave