[fix] Better element filtering