FIX: crash on empty pkg