fix some bugs
fix many bugs