         ix = thread_index % mx;
         iy = thread_index/my;
 
-        I = (ix + mbc)*xs + (iy + mbc)*ys;
+        I = (ix + mbc) + (iy + mbc)*ys;
 
         for(mq = 0; mq < meqn; mq++)
         {


    /* --------------------------------- Start code ----------------------------------- */


    dtdx = dt/dx;
    dtdy = dt/dy;

    /* Compute strides */
    xs = 1;
    ys = (2*mbc + mx)*xs;
    zs = (2*mbc + my)*xs*ys;

    maxcfl = 0;


            ix = thread_index % mx;
            iy = thread_index/mx;

            I = (ix + mbc) + (iy + mbc)*ys;

            for(mq = 0; mq < meqn; mq++)
            {
