fixed issues from demo