Fixing next_thetas.