Bug fix for upload form