fix phonegap bug