Fix version check routine