Fixes for AMD compatibility.