Updated the 5xxx revto use spell exhaust properly and fixed the 3777(deb) rev to compile on linux.