fixed sending serialized controls over socket, and buggy serialize/deserialize-implementation