LPS-33837 Fixing broken logic