I have a document that must be compiled using XeLaTeX. If I open TeXshop and compile this file first, everything is fine and it works. However, if I open a different file that is normally compiled with pdflatex, it will compile that fine. But if I now try to compile the file that requires xelatex, I get an error, since the console shows that it is trying to use pdflatex. I tried looking in preferences and telling it to use the xelatex command, but it doesn't seem to do anything. Also, if I compile the xelatex file first, and then try compiling the other one, it works fine, but the console shows that it was compiled using xelatex.
Any ideas on why it is behaving like this, and what I can do to switch between behaviors without restarting Texshop?