Fix non-interactive mode