Converted project from Cordova 2.0 to Cordova 2.7. The max function for db index references is broken in 2.6. PHONEGAP FAIL!