Fix compatibility issues