Fixed shell variable scope bug when pushing to Github