fixed templates generation