Fixed return of function