Minor, but important code fixes.