fixes for cordova use-case