Fixing the replace group on template helper