Fix bug from demo