Fix some bugs but still not complete to fixing all bugs
Fix many bugs and seems to work now