fix bugs with upload form