Further fixes for platform-independence