Won't this fail since main.remote is zero? You could instead do:

```python
if not self.remote:
```