The bios has to be set first to AHCI then windows installed. Cant install windows in ATA mode then switch. This is why you got the problem. You have to install windows after the switch for it setup right for AHCI.
OK so I am reinstalling Windows. It currently is working on "resetting this PC" which I hope doesn't mean installing Windows because I havn't set the BIOS yet.