Fix some more compatibility issues