MODE-1561 - Updated code as per review