some fixes for Linux emulation