by_handles empty result fix