Fixed the bug! (I think)