Email and HR Fixes

Fixed bugs in the email and HR modules.