Fixed missing brackets in beta_q