fixed the defects