Fixed the shape inference rule.