fix bugs for spherical arrays