fix first bugs with phonegap