many bugs fix