tighten result shape check