improved portability again