Fixed minor bug calculating generic OS
Performance fix.