Added some compatibility fixes.