Added sanity check for Shape_i