Fixed bug with data size sent to client