bugfix upload handler