fixed bugs in version number check