Fix script problems.
Use initial priority for nodes.