fix bugs in script