Fixed file upload bug