Improved error handling of no data.