It seems to work after adding `else` here.

```
else {
   next();
}
```