Fixed typo that broke the script
Made extraction of versions much better