fixes #7535 load sample script api fix