Fix nil error from total results