Fix bad request when no rows returned.