Fix minor bugs in demo