Fixed some bugs/inconsistencies