MAX_ defines clearly aren't my friends. Thanks for pointing this out, Cydh.