fix returning invalid total filtered records