Fixed problems with css and templates