Better version detection