Fixed missing codes in script.