fix for multipart length error undefined error