fixed a logical error when using c-shape chaining and adapting x/y to hardware coordinates