Finish upstream improvements for different OSes