Fixed a bug on unix systems