fix some bugs in linux