Bug and code fixes.