Fixed bugs in the stuff that should be proven