some bugs fixxed