Some fixes to new code.