fix replace return type