fixed a memory management bug in SPN_INS_ARRGET; removed static variables