fix platform issues on linux