Fixing compatibility issues (incomplete)