fix jpeg upload