Fixed main demo code.