Change function declaration to not change the programID. DONT CHANGE programID, is should only be set once for the inital symbol table of the entire program. Functions declarations seems to behaving better now