Fixed error when a package directory does not exists