fix for non-interactive shell