Fix filterByMagic