Fixed collapsing, update templates