Various compatibility optimizations