Fixes #124 Exception thrown on /api/profile