fix empty result bug