Fix link handling

- add missing var
- remove preventDefault because we actually want the default thing to happen
- fix variable name