fixed several bugs
demo ready