fixes template of filling R