fixed bad order in funcmap creation