#4445: Fixed bug for different systems.

See comment around code