demo code fix