add some compatibility support.