Fix the user profile fetching and add a bit of error handling