Another attempt at fixing phonegap dialog.