fix many bugs
fix many bugs