fix portability issue