fixed a bunch of demo and tempalte related things