empty upload and other fixes