fix bugs in Package2JSON.java