small bugfixes

- variable used before init (minor)
- import uses incorrect check for empty pacman group (minor)