returning user-agent correctly