API fixed to work with the latest version of SGScript