Fix the end in script