fixed: possible segmentation error at upload time