Fix remaining compatibility issues (I think)