Fix bugs of compute_shape in dot expr