LPS-51028

Hey Minhchau,

Do you mind having a look at this?
Seems like this logic has been changed a bunch of times over the last couple of months and it started with LPS-48090.

Please, send to Ray if you think this is good,

Thanks,