Patched up bugs introduced with the recent restruct.