Fix ordering problem with scripts