Fixed a bug introduced when improving the function interface.