Fixed js error in upload form