Fix invalid condition in tesla generator think