fix two defects