Fixed a bug where RUnlock was called instead of Unlock