fixed the dispatch table for functions