Fixes to prevent duplicate emails