Fixed missing halo_size dependence and numeric issue in adressing grid indices