Fixed Spencer's shitty fix to my not-so-shitty code.