CSV upload code fix