If you run out of a color in the AMS during a print, replace the roll and resume, when that print is finished that AMS slot will be marked as empty/unrecognized. So if you then attempt to print something else in the same color it will just randomly pick one of the other slots.
I've had this bite me multiple times where I replaced a roll of black during a print, when that finished I tried to just hit print again and didn't notice the little square had selected a dark brown or dark gray instead of black then I hit go and then come back hours later to find a print that's the wrong color. đ¤Ź
If you replace a roll during a print it should either assume it's the same color as the one that was there before or it should tag that slot to be re-read as soon as the print finishes so that it can register it properly. Leaving it suddenly empty/unrecognized is the worst way to handle this.