Fixes bug in mail.
Removes empty ids from detectors.
Merge branch 'master' into develop