fixed the return of controller