buf fixes
handle disconnection gracefully (station mode)