Make pkg_not_found a bool instead of an int.
Fix memory leak.