fix code that determines correct extpack