Fix return of function to get rid of warning