Fix Temp variable bug