Added handling of empty result situation.