Search does not filter correctly