changes for confirmation token and other bugs