fix logic to display "no data" message