more portability fixes.