fixed os version detection bug