Small fixes in demo code