Some changes on valvetemplate