Fixed bug where app stopped ssampling if alert was shown