Fixed exception thrown when selecting a function that no longer exists.