fixed issue in enternotify with trying to acces elements of a null structure. may be some new code from trying to fix the stdin issue.