fixed loading of non-external functions.