some few bug fixes