fix bug with checking upload