fixed many-many bugs;