Another attempt at fixing phonegap dialog. Again...