fixed demo api bugs