some fixes for tempalte config