improved portability of some tests