Fix version detection from tag