some bugfix and demo adjust