fixed various bugs, mainly on class path.