middle of debugging, fix many errors