Fixes some problems with email manager