Fix & upgrade template