fixing template initialisation