Fix minor bugs from the defect list.