LPS-25368 fix null pointer exceptions