Fix bug in non-interactive example