Fix namespace from function