fixed the double free bug. fixed oct input bug.