this code may generate repeated osd.