Fixed some problems on Linux