fixed undefined call in anonymous wrapper