*fix some NBV bugs make the program runnable