Fix bad boolean logic