Fixed some compatibility issues.