fixed empty result bug