file-upload fixes
File upload fix, test fixed aswell
merge