fix many errors