fixes user-agent header detection