fix for phone gap 3.0