Fixed some proof closure bugs