Fixing bug on route and script generation.