(OSD BRANCH) Sync with osd code from main branch (nw)