Fix uploadHandler