Fix table generation for m=2