Fix version detection in upgrade script