fixed a typo. But need to modify the API to support variable shapes.