fix bug with phone gap