Added locks to provider