some fixes and wrapper also valid for iOS