Fixed bugs that caused the oStream to disconnect
Updated the demo to test how the server handles invalid data