fix clicking on addButton, checking maxFileQuantity