fix bugs in scripts.