[Bug Fix] Fixed infinite mutex locking.