Fixed crash on empty result sets.