Fix rebase conflicts

- Fixes #123
- Fixes #497