fixed issue with empty result