fixes for Cordova 3