Fixed some issues with the scripts encoding