fixed rare cases of bad pkg version parsing