Fix error in all IDs filter function