fix deleting non-selected category