Fix API3.x compatibility issues;