fixed MainActivity to listen for broadcasts and toast