fix plans table encoding