LPS-48453 Fix logic