Bugfix to email monitoring