fixed 500 error on zero results