fixed bug in BroadcastReceiver
adjusted unittest for new BroadcastReceiver usage