minor tidying
allow user_agent to be overridden again