fixed confirmation bug, and some small issues