fixed bug when clicking add-new button multiple times