get rid of warning messages in merge function