Fix an issue with functions