script state is not thread-safe