some minor bug fix.