another portability fix, added TODO