Add more function checking.