Crossplatform fixes.