checking for interactive shell and minor fixes