bug fix on  and code review.