Fixed ivan's mistakes.