fix bugs to run demo