Some code fixes.