Fixes errors in native wrapper