Fix some backwards logic