initialize $second var in order to prevent variable abuse in rg=on and fix