fixed some script problems
fixing problem