fix portability