bug fix and demo completion