fix a bug of RWlock