Fix bugs in odcommon scripts
Modify control ports scripts