New script converter and fixed compilation error