fixed maxlength for sprintf_alloc 50 was not enough ... 1024+strlen(fmt) is much...