Fix locking issue and reenable URIPolicyTest