fixing bugs on ConstantPoolReader