added logic to properly exit from bash shell to prevent hanging sessions
Merge remote-tracking branch 'origin/master'