fix some bugs phonegaps