addressing phonegap js issue