A few bug fixes.