fixed error with filter when card is undefined