Fixed some pretty major behavioral bugs. Whoops.