fixed the bugs
update some minor style changes