Fix error where it was not correctly writing the return of the function in the map.