many bug fixes.