upload.php bug fix