       parts[i].St = -1.;
     } 
     if(h < 0) {
-      Un = parts[i].u - bc.uED;
+      Un = -(parts[i].u - bc.uED);
       // if this is the first time step with contact, set St
       // otherwise, use St that was set at the beginning of the contact
       if(parts[i].St == -1.) {

      parts[i].St = -1.;
    }
    if(h < 0) {
      Un = parts[i].w - bc.wTD;
      // if this is the first time step with contact, set St
      // otherwise, use St that was set at the beginning of the contact
      if(parts[i].St == -1.) {

      parts[i].St = -1.;
    }
    if(h < 0) {
      Un = -(parts[i].v - bc.vND);
      // if this is the first time step with contact, set St
      // otherwise, use St that was set at the beginning of the contact
      if(parts[i].St == -1.) {
