fix category creation when clicking the 'add' button