Fix up a few bugs in the bellman basis.