Fix error when cleanup the script