Fix FileUpload and WebSocket Chat Problems

Fixed some issues, and now the FileUpload and WebSocket Chat example apps work.