[Fixed] small fixes to make file upload work correctly