few bug fixes.