Fix defects