Fixed an stupid NPE
Fixed packet handling for non-websocket connections