Fix returns for functions.