Empty result bug fix