Fixed deadlock bug in SpinRWMutex
Fixed some mutex bugs