Fixed empty result bug