Fixes adaptor and function called issue.