Fixed compatibility and API issues.