Fix phone gap issues and upgrade it to 3.3