some bugs fixed
merges