Move helper into common.