linux compatibility fixes