Fix errors on user update and when accessing /datasets

Fixes #446