Fix bug with functions that are called but never defined