Better parsing of package handles