modifying some bugs