fixing "open" on linux and mac