Is there ever a case where func() could be undefined? If so, we should add a check and an error log here.