fix the script error caused by variable used before define