Added version exist check, fixed reversed order