fix some bugs & Cosmetics