few more portability tweaks