Proper fix for Optifine compatibility.