fix undefined var notice when no upload happened