fixed invalid event.buttonIndex with device.showAlert (#207)