LPS-50808 use correct boolean logic