Implemented restore to regular shell after WS connection is closed