fix many mistakes