fix bugs and refactor AlertConfig
Merge pull request #311 from leonindy/master

fix bugs and refactor AlertConfig