Replaced callback code in demo.