Code changed to fix bug DEMO-12