fix some problems for linux