some bugs fixed
style changes