Fix environment prepare script