fixing sorting for versions