Fix the upload modal's button handling