Fixed amd support.

Previous merge broke amd support.
I've fixed it.