Fixing unix bug