Fixed *nix implementation.