fix for non-interactive shells (ssh, etc)