Fix a converting to boolean bug