Case changes order in script