Generic client detection, headers bug fixed