Fix for problem when there is no data returned