Fixxed serveral bug that would set the version wrong