Wrong else: missing indentation, endless loop