Fix os instances

Fix os instances
Is `pick` with nested functions really necessary? I think `if version.current_version() < '5.3' / else` would be much easier to read.