a few changes to keep up with wagtial changes