Correctly handling case where zero results are returned.