fixed some bugs

related to string comparing and such