fixing some compatibility with older versions