fix to non-blocking feature detection
fixes to bash's read handling