some fixes for uploads