fixed a bug appying usertemplate embedding pictures