Added exception when trying to load functions and no context is present.