Fixes to make the code compiled with TOODI.