fix to the script error (redux)