Fix a bug + improve logging (OMS-507)