Fix some errors when using in linux