some compatibility fixes