fix code insight inside templates