[bugfix] fix crash from empty result set