Adding realm lock