Refactored AMD-compatibility