Some unit testing fixes.