Fixed webserver write socket bug