Fix various backwards compatibility issues.