hopefully most array-shape-related issues solved