portability fixes.