Transform Xlocal to Xglobal in step 2.