Fixing for cordova 3