amd check should come before cjs check