Fixed a fatal bug

God, I'm just comiting all over the place. Every time I try to add new
features, I end up completely breaking something. Well, seeing as how
everything works now (nearly), I'm going to take a break from trying to
add too many new features.