Fixed demo code