Fix some of the defects.