Fixes bug in mail.
Removes empty ids from detectors.