Fix checking installed packages