portability improvements