Added check to avoid error messages on search results page when users are displayed.