Fixed some problems for Linux I introduced from Windows