Figuring out the bug