fixing events to solve timeout on phonegap on android