Fix array out of bounds error for package clone method

Signed-off-by: goneall <gary@sourceauditor.com>