remove redundant code from #2051