better user agent detect in ContactHandler