Fixed bug in version checking