Correct some bugs and added some controls to autocertification methods