Made beta_grid 2.6 compatible