File upload bugfix